package com.yegs.jltqc.VO;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

public class QcProduceWorkFlow {

    private static final String[] FLOW = {"主管部门", "PMC部门", "业务部门","采购部门", "研发部门", "质量总监"};

    public static String getNext(String key){
        for (int i = 0; i < FLOW.length; i ++){
            if(FLOW[i].equals(key)){
                if(FLOW.length == i+1){
                    return FLOW[i];
                }
                return FLOW[i+1];
            }
        }
        return FLOW[0];
    }
    public static String getNext(){
        return getNext(null);
    }

    public static String getLast(){
        return getNext(FLOW[FLOW.length-1]);
    }
}
